//
//  NEDConsole.h
//  NEDBugConsole_Example
//
//  Created by 98du on 2021/12/14.
//  Copyright © 2021 林宁宁. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NEDConsoleConstant.h"
#import "NEDConsoleMenuItem.h"

NS_ASSUME_NONNULL_BEGIN

typedef void (^NEDConsoleEnvironmentHandle)(void);

@interface NEDConsole : NSObject

@property (copy, nonatomic, readonly) void(^routerHandle)(NSString * routerURL);

@property (retain, nonatomic, readonly) UINavigationController * consoleNavc;


+ (instancetype)console;

/// 显示屏幕上的浮动按钮
+ (void)showConsoleFloatWindowMenu;

/**
 是否开启Debug模式
 */
+ (void)enableDebugMode;

+ (void)hiddenConsoleMenu;

+ (void)showConsoleMenu;

#pragma mark - 环境切换

/// 添加各环境设置
/// @param handle 环境设置回调
/// @param description 当前域名信息简略，方便查看
+ (void)addEnv:(NSInteger)env
        handle:(NEDConsoleEnvironmentHandle)handle
   description:(NSString * _Nullable)description;

/// 环境描述
+ (NSString *)queryEnvDes:(NSInteger)type;
+ (NSString *)queryCurrentEnvDes;

/// 需要环境设置好之后调用
+ (void)updateCurrentEnvironment;

+ (NSDictionary *)queryAllEnvMapConfig;

#pragma mark - 路由 url 跳转

+ (void)addRouterHandle:(void(^)(NSString * routerURl))handle;

#pragma mark - 调试测试

+ (void)addTestDes:(NSString *)testDes handle:(void(^)(void))handle;

+ (NSArray <NEDConsoleMenuItem *>*)testAllItems;

@end

NS_ASSUME_NONNULL_END
